<div class="form-group">
    <label class="col-sm-2 control-label">股东等级</label>
    <div class="col-sm-9 col-xs-12">
        {ifp 'globonus.partner.edit'}
        <select name='gdata[partnerlevel]' class='form-control'>
            <option value='0'>{php echo empty($plugin_globonus_set['levelname'])?'默认等级':$plugin_globonus_set['levelname']} </option>
            {loop $partnerlevels $level}
            <option value='{$level['id']}' {if $member['partnerlevel']==$level['id']}selected{/if}>{$level['levelname']}</option>
            {/loop}
        </select>
        {else}
        <input type="hidden" name="gdata[partnerlevel]" class="form-control" value="{$member['partnerlevel']}"  />

        {if empty($member['partnerlevel'])}
        {php echo empty($plugin_globonus_set['levelname'])?'默认等级':$plugin_globonus_set['levelname']}
        {else}
        {php echo pdo_fetchcolumn('select levelname from '.tablename('mx_shop_globonus_level').' where id=:id limit 1',array(':id'=>$member['partnerlevel']))}
        {/if}
        {/if}
    </div>
</div>
<div class="form-group">
    <label class="col-sm-2 control-label">累计分红</label>
    <div class="col-sm-9 col-xs-12">
        <div class='form-control-static'> {php echo $member['bonusmoney']}</div>
    </div>
</div>
 
{if !empty($member['partnertime'])}
<div class="form-group">
    <label class="col-sm-2 control-label">成为股东时间</label>
    <div class="col-sm-9 col-xs-12">
        <div class='form-control-static'>{php echo date('Y-m-d H:i:s',$member['partnertime'])}</div>
    </div>
</div>
{/if}
<div class="form-group">
    <label class="col-sm-2 control-label">股东权限</label>
    <div class="col-sm-9 col-xs-12">
        {ifp 'globonus.partner.check'}
        <label class="radio-inline"><input type="radio" name="gdata[ispartner]" value="1" {if $member['ispartner']==1}checked{/if}>是</label>
        <label class="radio-inline" ><input type="radio" name="gdata[ispartner]" value="0" {if $member['ispartner']==0}checked{/if}>否</label>
        {else}
        <input type='hidden' name='gdata[ispartner]' value='{$member['ispartner']}' />
        <div class='form-control-static'>{if $member['ispartner']==1}是{else}否{/if}</div>
        {/if}

    </div>
</div>

<div class="form-group">
    <label class="col-sm-2 control-label">审核通过</label>
    <div class="col-sm-9 col-xs-12">
        {ifp 'globonus.partner.check'}
        <label class="radio-inline"><input type="radio" name="gdata[partnerstatus]" value="1" {if $member['partnerstatus']==1}checked{/if}>是</label>
        <label class="radio-inline" ><input type="radio" name="gdata[partnerstatus]" value="0" {if $member['partnerstatus']==0}checked{/if}>否</label>
        <input type='hidden' name='oldpartnerstatus' value="{$member['partnerstatus']}" />
        {else}
        <input type='hidden' name='gdata[partnerstatus]' value='{$member['partnerstatus']}' />
        <div class='form-control-static'>{if $member['partnerstatus']==1}是{else}否{/if}</div>
        {/if}
    </div>
</div>

<div class="form-group">
    <label class="col-sm-2 control-label">强制不自动升级</label>
    <div class="col-sm-9 col-xs-12">
        {ifp 'globonus.partner.edit'}
        <label class="radio-inline" ><input type="radio" name="gdata[partnernotupgrade]" value="0" {if $member['partnernotupgrade']==0}checked{/if}>允许自动升级</label>
        <label class="radio-inline"><input type="radio" name="gdata[partnernotupgrade]" value="1" {if $member['partnernotupgrade']==1}checked{/if}>强制不自动升级</label>
        <span class="help-block">如果强制不自动升级，满足任何条件，此股东的级别也不会改变</span>
        {else}
        <input type="hidden" name="gdata[partnernotupgrade]" class="form-control" value="{$member['partnernotupgrade']}"  />
        <div class='form-control-static'>{if $member['partnernotupgrade']==1}强制不自动升级{else}允许自动升级{/if}</div>
        {/if}
    </div>
</div>


{if $diyform_flag_globonus == 1}

    <div class='form-group-title'>自定义表单信息</div>

    {php $datas = iunserializer($member['diyglobonusdata'])}
    {loop $gfields $key $value}
    <div class="form-group">
        <label class="col-sm-2 control-label">{php echo $value['tp_name']}</label>
        <div class="col-sm-9 col-xs-12">
            <div class="form-control-static">
                {template 'diyform/diyform'}
            </div>
        </div>
    </div>
    {/loop}
{/if}